// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   Data.java

package include.nseer_cookie;

import include.nseer_db.nseer_db;
import java.sql.ResultSet;

public class Data
{

	private String value;
	private nseer_db db;
	private ResultSet rs;

	public Data(String dbase, String table, String fn, String fv)
	{
		try
		{
			db = new nseer_db(dbase);
			String sql = (new StringBuilder("select * from ")).append(table).append(" where ").append(fn).append("='").append(fv).append("'").toString();
			rs = db.executeQuery(sql);
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
	}

	public String getPara(String fn)
	{
		try
		{
			if (rs.first())
				value = rs.getString(fn);
			else
				value = "";
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
		return value;
	}

	public void close()
	{
		db.close();
	}
}
